<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<!-- meta -->
<meta name="keywords" content="">
<meta name="description" content="">
<!-- /meta -->
<title>段階表示設定 作成</title>
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/base.css">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/headerfooter.css">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/ulol.css">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/arrow.css">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/elements.css">
<!-- admin -->
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/base_admin.css">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/elements_admin.css">
<!-- /admin -->
<script type="text/javascript" src="<%= request.getContextPath() %>/common/js/library.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/for_winie3.css">

<script language="JavaScript">

	function selectField(fieldkey){

		$('#selectField').val(fieldkey);

		document.frm.action = '<%= request.getContextPath() %>/outputfront/popupStageSetting-add';
		document.frm.submit();
	}


	function doDeleteRow(index) {
		document.getElementById("deleteId").value = index;
		document.frm.action = '<%= request.getContextPath() %>/outputfront/popupStageSetting-del';
		document.frm.submit();
	}

	function doInsertRow() {

		var url = '<%= request.getContextPath() %>/outputfront/popupStageSelect?sortSign=1';
		window.open(url,'popupStageSelect', 'width=650, height=600, menubar=no, toolbar=no, scrollbars=yes');

	}

	function makeDisplay() {

		var editIndex = $('#editIndex').val();
		var stageFieldKeyList = $('#stageFieldKeyList').val();
		var sort = $('#sort').val();

		window.opener.settingStageComplete(sort, editIndex, stageFieldKeyList);
		window.close();
	}


</script>
</head>
<body id="dch" >
<!-- === headerArea === -->
<div id="headerArea">
<a name="pageTop" id="pageTop"></a>
</div><!-- === /headerArea === -->
<!-- === mainArea === -->
<div id="mainArea">
<form name="frm" action="<%= request.getContextPath() %>/outputfront/treeset-setStage" >
<s:hidden name = "editIndex" />
<s:hidden name = "sort" />
<s:hidden name = "mainFieldKey" />
<s:hidden name = "stageFieldKeyList" />

<s:hidden name = "selectField" />
<input type="hidden" id = "deleteId" name = "deleteIndex" />
<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr valign="top">
		<td width="20"><img src="<%= request.getContextPath() %>/common/images/spacer.gif" width="20" height="4" border="0" alt=""></td>
		<td id="contentsArea">
		<!-- === contentsArea === -->
			<!-- headingLv01Block -->
			<div class="headingLv01Block">
				<!-- headingLv01 -->
				<h1>段階表示設定 作成</h1>
				<!-- /headingLv01 -->
				<!-- lead -->
				<div class="lead">
				</div>
				<!-- /lead -->
			</div>
			<div class="columnB01">
			 <s:fielderror/>
			 <s:actionerror/>
			 <s:actionmessage/>
			</div>
			<!-- /headingLv01Block -->
			<!-- columnB01 -->
			<div class="columnB01">
				<p class="text">段階表示設定を行います</p>
			</div>
			<!-- /columnB01 -->

			<div class="tableBlock">
				<!-- tableA01 -->
				<div class="tableA01">
				<table border="1" cellspacing="0" cellpadding="5" width="558">
					<tr>
						<!-- ラベル -->
						<th class="lv01B" width="100" colspan="2"><label for="fServiceName">段階表示リスト</label></th>
						<!-- エラー -->
						<th width="11" class="error">&nbsp;</th>
						<!-- 内容 -->
							<td width="370">
								<div class="tableA01" id="optionDiv" >
										<table id="innsertbl" border="1"  cellspacing="0" cellpadding="5" width="370">
											<tr>
												<th class="lv01B" width="55">&nbsp;分類段階</th>
												<th class="lv01B" width="30">&nbsp;操作</th>
												<th class="lv01B" width="250">名称</th>
											</tr>
											<s:iterator value="fieldKeyNameList" status="sta">
											<tr>
												<td>
													${sta.index + 2}段階
												</td>
												<td>
													<input type="button" value="削除" onClick="doDeleteRow(${sta.index})">
												</td>
												<td>
													<s:property value= "%{fieldKeyNameList[#sta.index]}" />
													<s:hidden name="fieldKeyNameList[%{#sta.index}]" />
													<s:hidden name="fieldKeyList[%{#sta.index}]" />
												</td>
											</tr>
											</s:iterator>
										</table>
										<input type="button" value="追加する" onclick="doInsertRow();">
									</div>
							</td>
					</tr>
				</table>
				</div>
				<!-- /tableA01 -->
			</div>
			<!-- pageNaviC01 -->
			<div class="pageNaviC01">
			<table border="0" cellspacing="0" cellpadding="10" width="558">
				<tr>
					<td width="298" class="left"><p><input type="button" value="キャンセル" style="width:100px" onclick="window.close();"></p></td>
					<td width="130" class="left">&nbsp;</td>
					<td width="130" class="right"><p><input type="button" value="作成する" style="width:130px" onclick="makeDisplay()"></p></td>
				</tr>
			</table>
			</div>
			<div style="display:none">
				<span id="inputOptionSpan"></span>
			</div>
			<!-- /pageNaviC01 -->
			<!-- === /contentsArea === -->
		</td>
		<td width="16"><img src="<%= request.getContextPath() %>/common/images/spacer.gif" width="16" height="4" border="0" alt=""></td>
	</tr>
</table>
</form>
</div><!-- === /mainArea === -->
<!-- === footerArea === -->
<div id="footerArea">
<!--#include virtual="<%= request.getContextPath() %>/common/include/footer.html" -->
</div><!-- === /footerArea === -->
</body>
</html>
<!-- System Architect is COOBA Corp
	Copyright 2010 COOBA Corp All rights reserved -->